<div class="comm-top">
	<h4 style="margin-bottom:0"><{if $vo.id}>修改<{else}>添加<{/if}>分组</h4>
	<div class="add_page_top"></div>
</div>
<form id="memberform">
	<input type="hidden" name='a' value='add' />
	<input type="hidden" name="num[id]" value="<{$vo.id}>" />
	<input type="hidden" name="num[group_id]" value="<{$vo.group_id}>" />
	<div class="shop_sort_box">
		<div class="shop_sort">
			<div class="shop_sort_title"><h4>分组名：</h4></div>
			<div class="shop_sort_set">
				<input class="shop_sort_text" name="str[group_name]" value="<{$vo.group_name}>" type="text" />
			</div>
		</div>
		<div class="shop_sort">
			<div class="shop_sort_title">
				<h4>&nbsp;</h4>
			</div>
			<div class="shop_sort_set">
				<span onclick="save(this);return false" id="saveBtn" class="btngreen30">完成</span>
				&nbsp;&nbsp;&nbsp;
				<span onclick="history.go(-1);" class="btngray30">返回</span>
			</div>
		</div>
	</div>
</form>
<script>
function save(obj){
    if($("input[name='str[group_name]']").val()==''){
        note_info('分组名不能为空',obj,'warn');return;
    }
    var layerLoad=layer.load(1,{shade:[0.1,'#666']});
    $.post('group.php',$('#memberform').serialize(),function(res){
        layer.close(layerLoad);
        res=$.trim(res);
        if(res=='suc'){
            note_info('保存成功！',obj);
            setTimeout('window.history.go(-1)',1200);
        }else{
            note_info('保存失败！',obj,'warn');
        }
    })
}
</script>